home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / what's new / sample code / human interface toolbox / packagetool / packagetool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-22  |  2.4 KB  |  106 lines

  1. /*
  2.     file PackageTool.h
  3.     
  4.     Description:
  5.     This file contains constant declarations and exported routine prototypes
  6.     used in the PackageTool application.
  7.     
  8.     PackageTool is an application illustrating how to create application
  9.     packages in Mac OS 9.  It provides a simple interface for converting
  10.     correctly formatted folders into packages and vice versa.
  11.  
  12.     by John Montbriand, 1999.
  13.  
  14.     Copyright: © 1999 by Apple Computer, Inc.
  15.     all rights reserved.
  16.     
  17.     Disclaimer:
  18.     You may incorporate this sample code into your applications without
  19.     restriction, though the sample code has been provided "AS IS" and the
  20.     responsibility for its operation is 100% yours.  However, what you are
  21.     not permitted to do is to redistribute the source as "DSC Sample Code"
  22.     after having made changes. If you're going to re-distribute the source,
  23.     we require that you make it clear in the source that the code was
  24.     descended from Apple Sample Code, but that you've made changes.
  25.     
  26.     Change History (most recent first):
  27.     10/19/99 created by John Montbriand
  28. */
  29.  
  30. #ifndef __FINDERDRAGPRO__
  31. #define __FINDERDRAGPRO__
  32.  
  33. #include <MacTypes.h>
  34. #include <Collections.h>
  35.  
  36. enum {
  37.     kAppCreatorType = 'pTeZ',
  38.     kAppPrefsType = 'PREF'
  39.     
  40. };
  41.  
  42.     /* apple menu constants */
  43. enum {
  44.     mApple = 128,
  45.     iAbout = 1,
  46.     iFirstAppleItem = 3
  47. };
  48.  
  49.     /* file menu constants */
  50. enum {
  51.     mFile = 129,
  52.     iQuit = 1
  53. };
  54.  
  55.     /* edit menu constants */
  56. enum {
  57.     mEdit = 130,
  58.     iUndo = 1,
  59.     iCut = 3,
  60.     iCopy = 4,
  61.     iPaste = 5,
  62.     iClear = 6
  63. };
  64.  
  65. enum {    /* the main menu bar resource */
  66.     kMenuBarResource = 128
  67. };
  68.  
  69.     /* alert id numbers */
  70. enum {
  71.     kPackageDidNotVerify = 129,
  72.     kFailedToCreatePackage = 130,
  73.     kOpenAppFailedAlert = 135,
  74.     kMainFailedAlert = 136,
  75.     kAboutBoxAlert = 137
  76. };
  77.  
  78.     /* main string list resource constants */
  79. enum {
  80.     kMainStringList = 128,
  81.     kNotAFolder = 1,
  82.     kBundleAlreadySet = 2,
  83.     kBrokenAlias = 3,
  84.     kMoreThanOneAlias = 4,
  85.     kMainOutsideOfPackage = 6,
  86.     kNoAliasPresent = 7,
  87.     kInSameDirectory = 8,
  88.     kFileSharingOn = 9,
  89.     kAliasRefersToFolder = 10
  90. };
  91.  
  92.     
  93. /* routine prototypes */
  94.  
  95. /* ParamAlert is a general alert handling routine. It calls AEInteractWithUser
  96.     to ensure the application is in the forground, and then it displays an alert
  97.     after passing the s1 and s2 parameters to ParamText. */
  98. OSStatus ParamAlert(short alertID, StringPtr s1, StringPtr s2);
  99.  
  100.  
  101. /* GetCollectedPreferences returns the collection that is used for storing
  102.     application preferences. */
  103. Collection GetCollectedPreferences(void);
  104.  
  105. #endif
  106.